Jump to content
DJay

Google Calculator Percentage xxx% of xxx

Recommended Posts

I often use Google to calculate percentage fast i.e. "2,35% of 195"

I use it in German "2,35% von 195" ;)

 

Is there a way to get this without going to google and have a result in alfred? Or is there a workflow?

 

Thanks in advance for you help and reply.

Share this post


Link to post

I often use Google to calculate percentage fast i.e. "2,35% of 195"

I use it in German "2,35% von 195" ;)

 

Is there a way to get this without going to google and have a result in alfred? Or is there a workflow?

 

Thanks in advance for you help and reply.

 

Hey there. I created a workflow that does this (and a few other things), called QuickCalc. It still needs some work (there are a few bugs lingering around), but it should be able to accomplish what you're asking for.
 
It doesn't automatically detect locales, so you'll need to manually set the thousands/decimal separators. In Alfred's preferences, find QuickCalc, double click the "qc" script filter, and set the script to the following:
 
export THOUSANDS_SEPARATOR='.'
export DECIMAL_SEPARATOR=','
/usr/bin/ruby main.rb "{query}"

I just added support for those separators today, so let me know if you find any issues with it.

 

Oh, and one downside to setting the separators like this is that you'll have to re-enter them when you update the workflow. I'll try to find a better solution for that.

Edited by Clinton Strong

Share this post


Link to post

Wow. Great. Thanks a lot. It does exactly what I was looking for. And also thanks for the short guide to manually set the thousands/decimal separators.

Share this post


Link to post

Alfred can do on its own this if you're prepared to treat percentages as the fractions they are.

 

Type 295 * 0.0235 and Alfred will do the business. The default in Alfred's calculator is to use the OS X locale-specific separator, so if your user account is set to German language and formats, 295 * 0,0235 should give you the desired result.

Share this post


Link to post

Alfred can do on its own this if you're prepared to treat percentages as the fractions they are.

 

Type 295 * 0.0235 and Alfred will do the business. The default in Alfred's calculator is to use the OS X locale-specific separator, so if your user account is set to German language and formats, 295 * 0,0235 should give you the desired result.

 

The Google Suggest workflow will do this as well.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...